#include<stdio.h>
#include<stdlib.h>

int main()
{
	int i,j;
	int x=1;
	int y=20;
	int velocity_x=1;
	
	while (1)
	{
		if (x>10||x<1)
			velocity_x=-1*velocity_x;
		x=x+velocity_x;
		system ("cls");
		for (i=0;i<x;i++)
			printf("\n");
		for (j=0;j<y;j++)
			printf(" ");
		printf("o\n");
	}
	return 0;
}

#include<stdio.h>
#include<stdlib.h>

int main()
{
	int i,j;
	int x=5;
	int y=20;

	for (i=0;i<x;i++)
		printf("\n");
	for (j=0;j<y;j++)
		printf(" ");
	printf("o\n");
	return 0;
}

#include<stdio.h>
#include<stdlib.h>

int main()
{
	int i,j;
	int x=10;
	int y=20;
	int velocity_x=1;
	
	for (x=1;x<10;x++)
	{
		system ("cls");
		for (i=0;i<x;i++)
			printf("\n");
		for (j=0;j<y;j++)
			printf(" ");
		printf("o\n");
	}
	return 0;
}

#include<stdio.h>
#include<stdlib.h>

int main()
{
	int i,j;
	int x=1;
	int y=20;
	int velocity_x=1;
	int velocity_y=2;

	while (1)
	{
		if (x>10||x<1)
			velocity_x=-1*velocity_x;
		x=x+velocity_x;
		if (y>20||y<1)
			velocity_y=-1*velocity_y;
		y=y+velocity_y;
		system("cls");
		for (i=0;i<x;i++)
			printf("\n");
		for (j=0;j<y;j++)	
			printf(" ");
		printf("0\n");	
	}
	return 0;
}

#include<stdio.h>
#include<stdlib.h>
#include<windows.h>

int main()
{
	int i,j;
	int x=1;
	int y=20;
	int velocity_x=1;
	int velocity_y=2;
	
	while (1)
	{
		Sleep(200);
			if (x>10||x<1)
				velocity_x=-1*velocity_x;
			x=x+velocity_x;
			
			if (y>20||y<1)
				velocity_y=-1*velocity_y;
			y=y+velocity_y;
			
			system ("cls");
			for (i=0;i<x;i++)
				printf("\n");
			for (j=0;j<y;j++)
				printf(" ");
			
			printf("o\n");
	}
	return 0;
}

#include<stdio.h>
#include<stdlib.h>
#include<windows.h>

int main()
{
	int i,j;
	int x=1;
	int y=20;
	int velocity_x=1;
	int velocity_y=2;
	
	while (1)
	{
		Sleep(200);
		if (x>10||x<1)
		{
			velocity_x=-1*velocity_x;
			printf("\a");
		}
		x=x+velocity_x;
		
		if (y>20||y<1)
		{
			velocity_y=-1*velocity_y;
			printf("\a");
		}
		y=y+velocity_y;
		
		system ("cls");
		for (i=0;i<x;i++)
			printf("\n");
		for (j=0;j<y;j++)
			printf(" ");
		
		printf("o\n");
	}
	return 0;
}

#include<stdio.h>
#include<stdlib.h>
#include<windows.h>

int main()
{
	int i,j;
	int x=1;
	int y=20;
	int velocity_x=1;
	int velocity_y=2;
	
	while (1)
	{
		Sleep(200);
			if (x>10||x<1)
			{
				velocity_x=-1*velocity_x;
				printf("\a");
			}
			x=x+velocity_x;
			
			if (y>20||y<1)
			{
				velocity_y=-1*velocity_y;
				printf("\a");
			}
			y=y+velocity_y;
			
			system ("cls");
			for (i=0;i<x;i++)
				printf("\n");
			for (j=0;j<y;j++)
				printf(" ");
			
			printf("o\n");
	}
	return 0;
}

#include<stdio.h>
#include<stdlib.h>
#include<windows.h>

int main()
{
	int i,j;
	int x=2;
	int y=20;
	int velocity_x=1;
	int velocity_y=2;
	int left=0,right=21,top=0,bottom=11;
	
	while (1)
	{
		for (i=0;i<=11;i++)
		{
			for (j=0;j<=21;j++)
			{
				if (x == i && j == y)
					printf("o");
				else if (i == top )
					printf("*");
				else if (i == bottom )
					printf("*");
				else if (j == left )
					printf("*");
				else if (j == right )
					printf("*");
				else
					printf(" ");
			}
			printf ("\n");
		}

		Sleep(200);
			if ( x>9 || x<2 )
			{
				velocity_x=-1*velocity_x;
				printf("\a");
			}
			x=x+velocity_x;
			
			if (y>18||y<3)
			{
				velocity_y=-1*velocity_y;
				printf("\a");
			}
			y=y+velocity_y;
			
			system ("cls");
	}
	return 0;
}